import Vue from "vue";
import VueRouter from "vue-router";
import HomeView from "../views/HomeView.vue";

Vue.use(VueRouter);

const routes = [
  {
    path: "/home",
    name: "home",
    component: () => import("../views/HomeView.vue"),
    redirect: "/home/index",
    children: [
      {
        path: "index",
        component: () => import("../views/Index.vue"),
      },
      {
        path: "joinus",
        component: () => import("../views/JoinUs.vue"),
      },
      {
        path: "paradise",
        component: () => import("../views/ParaDise.vue"),
      },
      {
        path: "kidsip",
        component: () => import("../views/KidsIp.vue"),
      },
      {
        path: "aboutus",
        component: () => import("../views/AboutUs.vue"),
      },
    ],
  },
  {
    path: "/",
    redirect: "/home/index",
  },
];

const router = new VueRouter({
  mode: "history",
  base: process.env.BASE_URL,
  routes,
});

export default router;
